package com.copm.ifm.message;

/**
 * @author tp
 */

public enum SendClientEnum {
    MSG("msg", "短信"),
    APP("app", "手机app"),
    EMAIL("email", "邮件"),
    WEB("web", "浏览器");


    public final String code;

    public final String name;

    public String getCode() {
        return this.code;
    }

    public String getName() {
        return this.name;
    }

    SendClientEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public static SendClientEnum val(String code) {
        //values()方法返回enum实例的数组
        for (SendClientEnum s : values()) {
            if (code.equals(s.getCode())) {
                return s;
            }
        }
        return null;
    }
}
